home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / DevPac v3.02b.adf / include / libraries / filehandler.i < prev    next >
Text File  |  1991-11-20  |  5KB  |  123 lines

  1.     IFND    LIBRARIES_FILEHANDLER_I
  2. LIBRARIES_FILEHANDLER_I SET    1
  3. **
  4. **    $Filename: libraries/filehandler.i $
  5. **    $Release: 1.3 $
  6. **
  7. **    device and file handler specific code for AmigaDOS 
  8. **
  9. **    (C) Copyright 1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND      EXEC_TYPES_I
  14.     INCLUDE "exec/types.i"
  15.     ENDC    ; EXEC_TYPES_I
  16.  
  17.     IFND      EXEC_PORTS_I
  18.     INCLUDE "exec/ports.i"
  19.     ENDC    ; EXEC_PORTS_I
  20.  
  21.     IFND      LIBRARIES_DOS_I
  22.     INCLUDE "libraries/dos.i"
  23.     ENDC    ; LIBRARIES_DOS_I
  24.  
  25.  
  26. * The disk "environment" is a longword array that describes the
  27. * disk geometry.  It is variable sized, with the length at the beginning.
  28. * Here are the constants for a standard geometry.
  29.  
  30.  
  31.  
  32.  STRUCTURE DosEnvec,0
  33.     ULONG de_TableSize         ; Size of Environment vector
  34.     ULONG de_SizeBlock         ; in longwords: standard value is 128
  35.     ULONG de_SecOrg         ; not used; must be 0
  36.     ULONG de_Surfaces         ; # of heads (surfaces). drive specific
  37.     ULONG de_SectorPerBlock  ; not used; must be 1 
  38.     ULONG de_BlocksPerTrack  ; blocks per track. drive specific 
  39.     ULONG de_Reserved         ; DOS reserved blocks at start of partition. 
  40.     ULONG de_PreAlloc         ; DOS reserved blocks at end of partition 
  41.     ULONG de_Interleave         ; usually 0 
  42.     ULONG de_LowCyl         ; starting cylinder. typically 0 
  43.     ULONG de_HighCyl         ; max cylinder. drive specific 
  44.     ULONG de_NumBuffers         ; Initial # DOS of buffers.  
  45.     ULONG de_BufMemType         ; type of mem to allocate for buffers 
  46.     ULONG de_MaxTransfer     ; Max number of bytes to transfer at a time 
  47.     ULONG de_Mask         ; Address Mask to block out certain memory 
  48.     LONG  de_BootPri         ; Boot priority for autoboot 
  49.     ULONG de_DosType         ; ASCII (HEX) string showing filesystem type;
  50.                  ; 0X444F5300 is old filesystem,
  51.                  ; 0X444F5301 is fast file system 
  52.     LABEL DosEnvec_SIZEOF
  53.  
  54. * these are the offsets into the array
  55.  
  56. DE_TABLESIZE    EQU    0    ; standard value is 11
  57. DE_SIZEBLOCK    EQU    1    ; in longwords: standard value is 128
  58. DE_SECORG    EQU    2    ; not used; must be 0
  59. DE_NUMHEADS    EQU    3    ; # of heads (surfaces). drive specific
  60. DE_SECSPERBLK    EQU    4    ; not used; must be 1
  61. DE_BLKSPERTRACK EQU    5    ; blocks per track. drive specific
  62. DE_RESERVEDBLKS EQU    6    ; unavailable blocks at start.    usually 2
  63. DE_PREFAC    EQU    7    ; not used; must be 0
  64. DE_INTERLEAVE    EQU    8    ; usually 0
  65. DE_LOWCYL    EQU    9    ; starting cylinder. typically 0
  66. DE_UPPERCYL    EQU    10    ; max cylinder.     drive specific
  67. DE_NUMBUFFERS    EQU    11    ; starting # of buffers.  typically 5
  68. DE_MEMBUFTYPE    EQU    12    ; type of mem to allocate for buffers.
  69. DE_BUFMEMTYPE    EQU    12    ; same as above, better name
  70.                 ; 1 is public, 3 is chip, 5 is fast
  71. DE_MAXTRANSFER    EQU    13    ; Maximum number of bytes to transfer at a time
  72. DE_MASK        EQU    14    ; Address Mask to block out certain memory
  73. DE_BOOTPRI    EQU    15    ; Boot priority for autoboot
  74. DE_DOSTYPE    EQU    16    ; ASCII (HEX) string showing filesystem type
  75.                 ; 0X444F5300 is old filesystem,
  76.                 ; 0X444F5301 is fast file system
  77.  
  78.  
  79. *
  80. * The file system startup message is linked into a device node's startup
  81. * field.  It contains a pointer to the above environment, plus the
  82. * information needed to do an exec OpenDevice().
  83. *
  84.  
  85.  STRUCTURE FileSysStartupMsg,0
  86.     ULONG    fssm_Unit    ; exec unit number for this device
  87.     BSTR    fssm_Device    ; null terminated bstring to the device name
  88.     BPTR    fssm_Environ    ; ptr to environment table (see above)
  89.     ULONG    fssm_Flags    ; flags for OpenDevice()
  90.     LABEL    FileSysStartupMsg_SIZEOF
  91.  
  92.  
  93. * The include file "libraries/dosextens.h" has a DeviceList structure.
  94. * The "device list" can have one of three different things linked onto
  95. * it.  Dosextens defines the structure for a volume.  DLT_DIRECTORY
  96. * is for an assigned directory.     The following structure is for
  97. * a dos "device" (DLT_DEVICE).
  98.  
  99.  STRUCTURE DeviceNode,0
  100.     BPTR    dn_Next        ; singly linked list
  101.     ULONG    dn_Type        ; always 0 for dos "devices"
  102.     CPTR    dn_Task        ; standard dos "task" field.  If this is
  103.                 ;     null when the node is accesses, a task
  104.                 ;     will be started up
  105.     BPTR    dn_Lock        ; not used for devices -- leave null
  106.     BSTR    dn_Handler    ; filename to loadseg (if seglist is null)
  107.     ULONG    dn_StackSize    ; stacksize to use when starting task
  108.     LONG    dn_Priority    ; task priority when starting task
  109.     BPTR    dn_Startup    ; startup msg: FileSysStartupMsg for disks
  110.     BPTR    dn_SegList    ; code to run to start new task (if necessary).
  111.                 ;     if null then dn_Handler will be loaded.
  112.     BPTR    dn_GlobalVec    ; BCPL global vector to use when starting
  113.                 ;     a task.  -1 means that dn_SegList is not
  114.                 ;     for a bcpl program, so the dos won't
  115.                 ;     try and construct one.  0 tell the
  116.                 ;     dos that you obey BCPL linkage rules,
  117.                 ;     and that it should construct a global
  118.                 ;     vector for you.
  119.     BSTR    dn_Name        ; the node name, e.g. '\3','D','F','3'
  120.     LABEL    DeviceNode_SIZEOF
  121.  
  122.     ENDC    ; LIBRARIES_FILEHANDLER_I
  123.